package com.hafu.service;

import com.hafu.dao.KhinfoDao;
import com.hafu.model.Khinfo;

import java.sql.SQLException;
import java.util.ArrayList;

public class KhinfoService {
    private KhinfoDao khinfoDao=new KhinfoDao();


    public boolean addKhinfo(Khinfo kh) throws SQLException {
        boolean aboolean = khinfoDao.addKhinfo(kh);


        return aboolean;
    }
    public boolean deleteKhinfo(int id)
    {
        boolean aboolean = khinfoDao.deleteKhinfo(id);


        return aboolean;
    }
    public ArrayList<Khinfo> getKhinfoByName(Khinfo kh){
        ArrayList<Khinfo> khinfos = khinfoDao.getKhinfoByName(kh);
        return khinfos;

    }
    public boolean updateKhinfo(Khinfo kh)
    {
        boolean aboolean = khinfoDao.updateKhinfo(kh);


        return aboolean;
    }
}
